package org.corf.endpoint.collector;

import org.corf.payload.Payload;
import org.corf.payload.PayloadHeaderKey;

public abstract class AbstractCollector implements Collector {

    protected final String name;

    protected AbstractCollector(String name) {
        this.name = name;
    }

    /**
     * Enrich a collected payload object with some meta data.
     * 
     * @param payload
     */
    protected void signPayload(Payload payload) {
        payload.setHeader(PayloadHeaderKey.COLLECTOR_ENTRY_STAMP.getKey() + Payload.PAYLOAD_KEY_DELIMITER + name, "");
    }

}
